
#include "ImageRgb.h"
#include "ImageGray.h"
#include "DiskXFile.h"
#include "ipHistoEqual.h"
#include "xtprobeImageDiskXFile.h"
#include "CmdLine.h"
#include "tp6.h"
 
using namespace Torch;

int main(int argc, char **argv)
{
	
	char *image_filename;
 	/*int n_gaussians;
 	//bool octon;
  	bool gray;
 	bool xy;
 	bool norm;
 	bool verbose;*/
  
  	// Construct the command line
    	CmdLine cmd;
	cmd.setBOption("write log", false);
 
   	// Put the help line at the beginning
    	//cmd.info(help);

   	cmd.addText("\nArguments:");
   	cmd.addSCmdArg("image filename", &image_filename, "image filename");
  	cmd.read(argc, argv);
	Process *process = new Process(image_filename);
	
	ImageRgb *imagesegmenter;
	
	process ->segmentation(imagesegmenter);
	//ImageRgb *imageDilater;
	process->dilatation(imagesegmenter);
	process->erode(imagesegmenter);

	
	process->buildImage();
	process->imageLabelling();
	process->buildIndividual();

	process->freeSpace();	
 
 	
 	 
 	return(0);
}

